local function Custom_BuffFrame(item)
	ShortLayout:SetGlobalHookTable("BuffButton_Update")

	local hookfunc = function (buttonName, index, filter)
		for specialItem, _ in pairs(ShortLayout.Special[Custom_BuffFrame]._items) do
			if (buttonName..index == specialItem._framename and getglobal(specialItem._framename)) then
					ShortLayout:SetItem(specialItem)
			end
		end
	end

	hooksecurefunc("BuffButton_Update", hookfunc)
end

local function Custom_MainMenuBar1(item)
	ShortLayout:DefaultCustomFunc(item, Custom_MainMenuBar1, "ExhaustionTick_Update")
end

local function Custom_MainMenuBar2(item)
	ShortLayout:DefaultCustomFunc(item, Custom_MainMenuBar2, "MainMenuBar_UpdateKeyRing")
end

local function Custom_ReputationFrame1(item)
	ShortLayout:DefaultCustomFunc(item, Custom_ReputationFrame1, "ReputationFrame_Update")
end

local function Custom_ReputationFrame2(item)
	ShortLayout:DefaultCustomFunc(item, Custom_ReputationFrame2, "ReputationBar_OnClick")
end

local function Custom_ReputationFrame3(item)
	ShortLayout:DefaultCustomFunc(item, Custom_ReputationFrame3, "ReputationWatchBar_Update", newLevel)
end

local function Custom_UIParent(item)
	ShortLayout:DefaultCustomFunc(item, Custom_UIParent, "UIParent_ManageFramePositions")
end

local function Custom_ContainerFrame(item)
	ShortLayout:DefaultCustomFunc(item, Custom_ContainerFrame, "updateContainerFrameAnchors")
end


ShortLayout.Special[Custom_BuffFrame] = {"^(BuffButton%d+)", "^(DebuffButton%d+)"}

ShortLayout.Special[Custom_MainMenuBar1] = {"ExhaustionTick", "ExhaustionLevelFillBar", "MainMenuExpBar", "ExhaustionTickHighlight"}

ShortLayout.Special[Custom_MainMenuBar2] = {"MainMenuBarPerformanceBarFrame", "MainMenuBarTexture3", "MainMenuBarTexture2", "KeyRingButton"}

ShortLayout.Special[Custom_ReputationFrame1] = {"^(ReputationBar%d+)", "^(ReputationHeader%d+)", "^(ReputationBar%d+Check)", "^(ReputationBar%d+FactionName)", "^(ReputationBar%d+FactionStanding)", "^(ReputationBar%d+AtWarCheck)", "^(ReputationBar%d+ReputationBarRight)", "^(ReputationBar%d+Highlight%d+)", "ReputationDetailFrame"}

ShortLayout.Special[Custom_ReputationFrame2] = {"ReputationDetailFrame"}

ShortLayout.Special[Custom_ReputationFrame3] = {"ReputationWatchStatusBar", "ReputationWatchBar", "^(ReputationWatchBarTexture%d+)", "^(ReputationXPBarTexture%d+)", "MainMenuExpBar", "MainMenuBarMaxLevelBar", "ExhaustionTick", "MainMenuBarMaxLevelBar", "ReputationWatchStatusBarText"}

--ShortLayout.Special[Custom_UIParent] = {"MultiBarBottomLeft", "MultiBarRight", "VoiceChatTalkers", "GroupLootFrame1", "TutorialFrameParent", "FramerateLabel", "CastingBarFrame", "ChatFrame1", "ChatFrame2", "ShapeshiftBarFrame", "SlidingActionBarTexture0", "SlidingActionBarTexture1", "ShapeshiftBarLeft", "ShapeshiftBarRight", "ShapeshiftBarMiddle", "PossessBarFrame", "^(ShapeshiftButton%d+NormalTexture)", "PetActionBarFrame", "BattlefieldMinimapTab", "^(WorldStateCaptureBar%d+)", "QuestTimerFrame", "DurabilityFrame", "QuestWatchFrame"}


ShortLayout.Special[Custom_ContainerFrame] = {"^(ContainerFrame%d+)"}

--[[
ShortLayoutTest = function ()
	MultiBarBottomLeft:SetPoint("BOTTOMLEFT", ActionButton1, "TOPLEFT", 0, 3)
	MultiBarBottomLeft:SetScale(0.8)
end

hooksecurefunc("UIParent_ManageFramePositions", ShortLayoutTest)
]]

